home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-21 / dvfax.zip / TRAPFAX.DOC < prev   
Text File  |  1993-02-23  |  6KB  |  129 lines

  1. This set of files was created to work with Quick Link II, but it should work 
  2. with any FAX receive program.  If your FAX receive program cannot be removed 
  3. after the FAX is received (as Quick Link can) other DESQview windows will 
  4. remain halted until you return.  But, at least, you got the FAX. 
  5.  
  6. I'll refer to the DESQview window where you intend to receive faxes as the 
  7. TrapFax window.  
  8.  
  9.   *  IMPORTANT  *  IMPORTANT  *  IMPORTANT  *  IMPORTANT  *  IMPORTANT  *  
  10. You must configure the TrapFax window so it will NOT share the CPU with 
  11. other windows.  2nd page of the Change a Program configuration screens 
  12. (Advanced Options).  The next to last entry on the bottom left.  "Share CPU 
  13. when foreground ....: [N]"  If you share time with other windows while 
  14. receiving a FAX, the FAX will fail.  That's the reason for this file set. 
  15.  
  16. You MUST NOT leave the TrapFax window (change windows) after the process has 
  17. started, until it is complete.  The CPU must be dedicated to a Class I modem 
  18. while it is receiving a FAX.
  19.  
  20. Be sure TRAPFAX.BAT and all the files it runs, listed below, are in the same 
  21. directory.  This is essential, double check to make sure.
  22.  
  23. The following 19 lines makeup TRAPFAX.BAT
  24.  
  25. 1   :START
  26. 2   IF NOT EXIST GONEXT.EXE GOTO ErrorMessage
  27. 3   GONEXT
  28. 4   IF NOT EXIST CHK4RING.EXE GOTO ErrorMessage
  29. 5   CHK4RING com1 ps2n
  30. 6   IF errorlevel 50 GOTO END
  31. 7   IF NOT EXIST GOFRONT.EXE GOTO ErrorMessage
  32. 8   GOFRONT
  33. 9   IF NOT EXIST RECFAX.BAT GOTO ErrorMessage
  34. 10  CALL RECFAX
  35. 11  IF NOT EXIST KILLTIME.EXE GOTO ErrorMessage
  36. 12  KILLTIME 7
  37. 13  IF errorlevel 50 GOTO END
  38. 14  CALL RECFAX out
  39. 15  GOTO START
  40. 16  :ErrorMessage
  41. 17  @ECHO  File Not Found!      ^^^^^^
  42. 18  :END
  43. 19  GOFRONT
  44.  
  45.  
  46. 1  :START                  
  47. A location label that marks the beginning of the batch file
  48.  
  49. 2  IF NOT EXIST GONEXT.EXE GOTO ErrorMessage
  50. This line checks for the GONEXT utility.  If it is not found it goes to 
  51. line 16 which gives an error message and exits the batch file.  Lines 4, 7, 
  52. 9 and 11 do this same sort of thing. 
  53.  
  54. 3  GONEXT
  55. A utility that puts you in some other DesqView window.  If you remain in the 
  56. TrapFax window nothing else will operate, because it does not share the CPU 
  57. when in the foreground.  It does share the CPU while running in the 
  58. background.  This utility makes sure you don't forget and leave the TrapFax 
  59. window in the foreground after starting TRAPFAX.BAT.  Also, it returns 
  60. TrapFax to the background after a FAX has been received and the cycle has 
  61. begun again.  
  62.  
  63.  
  64. 5  CHK4RING com1 ps2n
  65. This utility watches for the phone to ring.  When it sees the phone ring it 
  66. exits, letting the batch file continue.  This is the only line in the 
  67. TRAPFAX.BAT you may need to modify if you use Quick Link II.  It requires 2 
  68. command line arguments.  The first is the com port your modem is on stated 
  69. as COM1, etc. The 2nd indicates whether your computer is IBM PS2 
  70. micro-channel architecture.  This is indicated by entering PS2N for no and 
  71. PS2Y for yes, it is a PS2.  If you don't know, try PS2N. 
  72.  
  73. 6  IF errorlevel 50 GOTO END 
  74. This line will abort the batch file if you made an error when running the 
  75. previous utility, or if you abort CHK4RING or KILLTIME.  
  76.  
  77. 8  GOFRONT
  78. This utility forces any DESQview window it's run in to the front 
  79. (foreground).  In this case it forces the TrapFax window to the foreground. 
  80. Remember, you MUST configure your TrapFax window so it will not share the 
  81. CPU when it is in the foreground.  
  82.  
  83. 10  CALL RECFAX 
  84. RECFAX is a batch file that comes with Quick Link II.  It loads the receive- 
  85. a-fax TSR.  If you are using a version of DOS earlier than 3.3 you do not 
  86. have the CALL command.  You will have to put the contents of RECFAX.BAT 
  87. directly in TRAPFAX.BAT in place of the CALL RECFAX line. 
  88.  
  89. 12  KILLTIME 7
  90. This utility waits for the number of seconds indicated in the command line 
  91. argument.  In this case 7 seconds.  This wait is necessary to give the 
  92. receive-a-fax TSR time to realize the phone is ringing, emerge (become 
  93. active) and answer the phone.  Once the TSR emerges, KILLTIME is suspended.  
  94. It takes more than 7 seconds for the receive-a-fax process; so, when the TSR 
  95. finishes and withdraws, KILLTIME sees that more than 7 seconds have elapsed 
  96. and ends immediately.  NOTE:  If a caller hangs up after the second ring, 
  97. and before the TSR answers, it will wait forever to answer.  It's rare, but 
  98. if it happens, it ties up the machine until you return, or until another 
  99. call comes in. 
  100.  
  101. 13  IF errorlevel 50 GOTO END
  102. See line 6.
  103.  
  104. 14  CALL RECFAX out
  105. This runs the Quick Link II batch file with the "out" argument, to remove 
  106. the receive FAX TSR from memory.  See the explanation for line 10 if your 
  107. version of DOS is earlier than 3.3.
  108.  
  109. 15  GOTO START
  110. This line loops back to the beginning (START:) of the batch file and starts 
  111. the process all over again.  This creates an endless loop that resets 
  112. everything back to the way it was before the phone rang.  The system is 
  113. ready to receive the next FAX, and the other windows are running (multi- 
  114. tasking).  Pressing Esc will abort CHK4RING or KILLTIME, and exit 
  115. TRAPFAX.BAT.  You can also stop the process by closing the TrapFax window, 
  116. or pressing Control-C or Control-Break repeatedly.  
  117.  
  118. 16  :ErrorMessage
  119. 17  @ECHO  File Not Found!      ^^^^^^
  120. Displays this error message if the IF test in line 2, 4, 7, 9 or 11 fails.
  121.  
  122. 18  :END
  123. Quits the batch file if CHK4RING or KILLTIME fails to run properly or either 
  124. is aborted.  Also, if any of the required files are not found.  
  125.  
  126. 19  GOFRONT
  127. Returns the TrapFax window to the foreground after a failure, so you can see 
  128. something's wrong. 
  129.